
<fieldset>
<legend>采购明细</legend>
<table>
   <tr align="center">
     <th>序号</th>
	 <th>编号</th>
	 <th width="40%">名称</th>

 	 <th>单位</th>
	 <th>单价</th>
	 <th>数量</th>
	 
	 <th>总价</th>	 
   </tr>
   {[foreach name=outer key=key item=item from=$record_in]}   
   {[assign var="no" value="`$key+$pager->from+1`"]}
   {[assign var="total" value="`$item.amount*$item.price`"]}
   {[assign var="totals" value="`$totals+$total`"]}
   <tr align="center" onMouseOver="this.style.backgroundColor='#ECECEC'" onMouseOut="this.style.backgroundColor='#FFFFFF'">
     <td>{[$no]}</td>
	 <td>{[$item.material_o.code]}</td>
	 <td>{[$item.material_o.name]}</td>

	 <td>{[$item.material_o.unit]}</td>
	 <td>{[$item.price]}</td>
	 <td>{[$item.amount]}</td>
	 
	 <td>{[$total|string_format:"%.2f"]}</td>
  </tr>
  {[/foreach]}
  <tr>
	<td colspan="5"></td>
	<td align="center">合计</td>
	<td align="center">{[$totals|string_format:"%.2f"]}</td>
  </tr>
</table>
</fieldset>
